objs = start.o main.o

led.bin: $(objs)
	arm-linux-gnueabihf-ld -Timx6ul.lds $^ -o led.elf
	arm-linux-gnueabihf-objcopy -O binary -S -g led.elf $@
	arm-linux-gnueabihf-objdump -D -m arm led.elf > led.dis

%.o: %.c
	arm-linux-gnueabihf-gcc -Wall -nostdlib -c -o $@ $<

%.o: %.s
	arm-linux-gnueabihf-gcc -Wall -nostdlib -c -o $@ $<

clean:
	rm -rf *.o *.elf *.bin *.dis